﻿CREATE TABLE [dbo].[Sisteme] (
    [SECTIA]        NVARCHAR (255) NULL,
    [MAC]           NVARCHAR (255) NULL,
    [Nume]          NVARCHAR (255) NULL,
    [Nr_Inventar]   FLOAT (53)     NULL,
    [IMPRIMANTA]    NVARCHAR (255) NULL,
    [UTILIZATOR1]   NVARCHAR (255) NULL,
    [UTILIZATOR2]   NVARCHAR (255) NULL,
    [IDSistem]      INT            IDENTITY (1, 1) NOT NULL,
    [IDLocatie]     SMALLINT       NULL,
    [InDomeniu]     BIT            CONSTRAINT [DF_Sisteme_InDomeniu] DEFAULT ((0)) NOT NULL,
    [DataAchizitie] DATETIME       NULL,
    [IDDepartament] INT            NULL,
    [AdresaIP]      VARCHAR (15)   CONSTRAINT [DF_Sisteme_AdresaIP] DEFAULT ('') NOT NULL,
    [InRetea]       BIT            CONSTRAINT [DF_Sisteme_InRetea] DEFAULT ((1)) NOT NULL,
    CONSTRAINT [PK_Sisteme] PRIMARY KEY CLUSTERED ([IDSistem] ASC),
    CONSTRAINT [FK_Sisteme_Departamente] FOREIGN KEY ([IDDepartament]) REFERENCES [dbo].[Departamente] ([IDDepartament]),
    CONSTRAINT [FK_Sisteme_Locatii] FOREIGN KEY ([IDLocatie]) REFERENCES [dbo].[Locatii] ([IDLocatie])
);

